<template>
  <div>
    <el-form  style="overflow:auto" :inline="true" @submit.native.prevent>
      <slot></slot>
      <slot name="topFormItem"></slot>
      <el-form-item>
        <el-select @change="$emit('statusChange',typeInfo.year)" style="width: 120px;" v-model="typeInfo.year" placeholder="请选择">
          <el-option
          v-for="(year,index) in years"
            :label="year"
            :value="year" :key="index">
          </el-option>
          </el-select>
      </el-form-item>
      <el-form-item>
        <slot name="select"></slot>
      </el-form-item>
      <el-form-item>
        <el-input v-model="typeInfo.title" @change="search" placeholder="请输入项目名称" style="width: 20em;margin-right: 15px"
          clearable />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="search" :disabled='disabled'>搜索</el-button>
        <el-button type="info" @click="reset">重置</el-button>
      </el-form-item>
      <div style="float: right;">
        <slot name="right"></slot>
      </div>
    </el-form>
  </div>
</template>

<script>
  export default{
    name:'searchTt',
    props:['years','typeInfo','disabled'],
    data(){
      return{
        allow:true
      }
    },
    methods:{
      search(){
        this.$emit('search')
      },
      reset(){
        this.$emit('reset')
      }
    }
  }
</script>

<style>
</style>
